<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/8/23
 * Time: 15:32
 */

use doumiaoduo\layer\LayerConfirmWidget;
use doumiaoduo\layer\LayerIframeWidget;
use common\components\widgets\Datetimepicker;
use yii\helpers\Html;
use common\components\helpers\Fun;

LayerConfirmWidget::widget();
LayerIframeWidget::widget();
Datetimepicker::widget();


?>
<div class="yx-praise-list-box yx-praise-box yx-radius2  zx-min-height">
    <div id="search-area" class="yx-bgf7f7f7 yx-radius5 zx-mg yx-function2 yx-pr0">
        <?= Html::beginForm(Fun::url(['scholarapply/index']), 'get', ['enctype' => 'multipart/form-data']) ?>
        <?= \common\components\helpers\Search::textInput('name', null, ['label' => '会员名称', 'class' => 'search yx-width150 zx-lh24 yx-ml6']); ?>
        <?= \common\components\helpers\Search::dropDownList('status', null, [null => '请选择', 0 => '已提交', 1 => '审核中', 2 => '申请成功', 3 => '申请失败'], ['label' => '处理状态', 'promote' => '请选择', 'class' => 'search diy_select_txt']); ?>
        <?= \common\components\helpers\Search::submitButton('搜索', ['id' => 'search-handle', 'class' => "yx-search yx-radius2"]); ?>
        <?php Html::endForm() ?>
        <div class="yx-clear"></div>
    </div>
    <div class="docs-main zx-mg">
        <table id="tablesaw" class="tablesaw table yx-table1 yx-table5 table-striped with-check"
               data-tablesaw-mode="swipe" data-tablesaw-minimap>
            <thead>
            <tr class="yx-bgd2f6ec">
                <th><?= \Yii::t('zhtfrontend', 'ID'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '会员'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '使用人手机号'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '学员名称'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '学员年龄'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '地区'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '申请时间'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '处理状态'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '激活码'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '处理时间'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '处理人'); ?></th>
                <th><?= \Yii::t('zhtfrontend', '操作'); ?></th>
            </tr>
            </thead>
            <?php if ($data): ?>
                <?php foreach ($data as $item): ?>
                    <tr data-id="<?= $item['id'] ?>">
                        <td><?= $item['id'] ?></td>
                        <td><?= $item['customer_name'] ?></td>
                        <td><?= $item['telephone'] ?></td>
                        <td><?= $item['student_name'] ?></td>
                        <td><?= $item['student_age'] ?></td>
                        <td><?= $item['region'] ?></td>
                        <td><?= $item['created_at'] ?></td>
                        <td><?= $item['status'] ?></td>
                        <td><?= $item['v_code'] ?></td>
                        <td><?= $item['updated_at'] ?></td>
                        <td><?= $item['admin_name'] ?></td>
                        <td><?= $item['operate'] ?></td>
                    </tr>
                <?php endforeach; ?>
            <?php endif; ?>
        </table>
        <div style="text-align: right"><?= \yii\widgets\LinkPager::widget(['pagination' => $pages]) ?></div>
    </div>
</div>


